Fix RichTextBox flooding AT channel with entire document on focus#14675
Open
trypsynth wants to merge 1 commit into
Open
Fix RichTextBox flooding AT channel with entire document on focus#14675trypsynth wants to merge 1 commit into
trypsynth wants to merge 1 commit into
Conversation
Removes the explicit UIA automation notification from OnGotFocus that was sending the full Text of the control to assistive technology on every focus event. For large documents this caused NVDA and JAWS to freeze, and produced a double-announcement (the native MSAA focus event already reads the current line correctly). The pass-through override is kept to satisfy the shipped public API surface. Closes dotnet#14671
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14671
Proposed changes
Removes the explicit UIA automation notification from OnGotFocus that was sending the full Text of the control to assistive technology on every focus event. For large documents this caused NVDA and JAWS to freeze, and produced a double-announcement (the native MSAA focus event already reads the current line correctly). The pass-through override is kept to satisfy the shipped public API surface.
Customer Impact
Any rich text box with a lot of content in it risks freezing user's assistive technologies.
Regression?
Risk
Test methodology
Created a basic winforms app, created a RichTextBox inside it, gave it 6 lines, tested without my custom assembly and with, my custom version fixes the bug.
Accessibility testing
Tested with NVDA on Windows 11 24H2.
Test environment(s)
.NET SDK:
Version: 10.0.202
Commit: 1e7d5a8ae3
Workload version: 10.0.200-manifests.f96d7f23
MSBuild version: 18.3.3+1e7d5a8ae
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.202\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.6
Architecture: x64
Commit: 47fb725acf
.NET SDKs installed:
10.0.202 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Microsoft Reviewers: Open in CodeFlow